Readme for BGLM, JDE, 2023
2023-02-02, rpg


To replicate all tables and figures, there are three main options

1) SCons (requires Python module pystatacons) 
Type 'scons' at the appropriate command line

2) Statacons (requires Stata package statacons, Python modules pystatacons and SCons) 
Type 'statacons' at the Stata prompt (or 'scons' at the appropriate command line)
See https://bquistorff.github.io/statacons for statacons installation instructions

3) Master do-file
Type 'master.do' at the Stata prompt

TablesAndFigures/BGD-San-Soc-TablesAndFigures.tex will then compile all tables and figures from the paper and appendices into TablesAndFigures/BGD-San-Soc-TablesAndFigures.pdf


To trace the overall workflow of the project, type
statacons, dry_run tree(status,prune)
at the Stata prompt (must have statacons installed), or
scons -n --tree=status,prune
at the appropriate command line (must have SCons installed)

To trace the workflow of a specific file path/to/output.ext, type
statacons path/to/output.ext, dry_run tree(status,prune)
at the Stata prompt (must have statacons installed), or
scons path/to/output.ext -n --tree=status,prune
at the appropriate command line (must have SCons installed)

The analysis datasets are
input/data/group_analysis_SocIncent.dta
input/data/hh_analysis_SocIncent.dta

The analysis do-files are in the code folder.

Outputs (tables and figures) are in the output folder.

List of do-files for tables and figures in paper

Table 1: Randomization
code/designTable.do

Table 2: Descriptive Statistics and Balance Tests)
code/descriptive.do 

Table 3: Program Effects: Hygienic Latrine Ownership
code/basicProgramEffects-AllVill-groupLevel-regressions.do
code/basicProgramEffects-AllVill-groupLevel-tabfig.do

Table 4: Household Investments
code/new-improved-hhLevel-regressions.do
code/new-improved-hhLevel-tabfig.do

Figure 1: Timeline for a typical village
TablesAndFigures/graphics/BGD-San-Soc-Timeline.pdf

Figure 2: Program Effects: Hygienic Latrine Ownership
code/basicProgramEffects-AllVill-groupLevel-regressions.do
code/basicProgramEffects-AllVill-groupLevel-tabfig.do

Figure 3: Treatment Effects on Secondary Outcomes – Short Term
Figure 4: Treatment Effects on Secondary Outcomes – Medium Term
code/basicProgramEffects-AllVill-groupLevel-regressions.do
code/basicProgramEffects-AllVill-groupLevel-tabfig.do

Figure 5: Latrine Components Functional and Unbroken
code/components-hhLevel-AllVill-regressions.do
code/components-hhLevel-AllVill-tabfig.do

Figure 6: Latrine Condition and Maintenance
code/condition-hhLevel-AllVill-regressions.do
code/condition-hhLevel-AllVill-tabfig.do

Figure 7: Short-term Effects: Assistance from Others in Group
code/assistance-hhLevel-regressions.do
code/assistance-hhLevel-tabfig.do

Figure 8: Effect on Hygienic Latrine Ownership -- By Household’s Landless Status
Figure 9: Effect on Hygienic Latrine Ownership -- By Household’s Baseline Latrine Ownership Category
code/mechanisms-hhLevel-regressions.do
code/mechanisms-hhLevel-tabfig.do

Figure 10: Treatment Effect Heterogeneity by Distance to Reward Threshold
code/distThreshold-AllVill-groupLevel-regressions.do
code/distThreshold-AllVill-groupLevel-tabfig.do

Figure 11: Interaction of Reward Treatments with Distance to Threshold -- Short-term effects
Figure 12: Interaction of Reward Treatments with Distance to Threshold -- Medium-term effects
code/distThreshold-AllVill-groupLevel-semipar.do

Figure 13: Treatment Effect Heterogeneity by Baseline Hygienic Latrine Ownership
code/mechanisms-groupLevel-regressions.do
code/mechanisms-groupLevel-tabfig.do
